﻿using System;
using System.Runtime.InteropServices;
using Saar.FFmpeg.CSharp;

namespace Saar.FFmpeg.Structs {
	[StructLayout(LayoutKind.Sequential)]
	unsafe public struct AVCodecContext {
		public AVClass* AvClass;
		public int LogLevelOffset;
		public AVMediaType CodecType;
		public AVCodec* Codec;
		public fixed byte CodecName[32];
		public AVCodecID CodecId;
		public uint CodecTag;
		public uint StreamCodecTag;
		public void* PrivData;
		public IntPtr Internal;
		public void* Opaque;
		public long BitRate;
		public int BitRateTolerance;
		public int GlobalQuality;
		public int CompressionLevel;
		public AVCodecFlag Flags;
		public int Flags2;
		public byte* Extradata;
		public int ExtradataSize;
		public AVRational TimeBase;
		public int TicksPerFrame;
		public int Delay;
		public int Width;
		public int Height;
		public int CodedWidth;
		public int CodedHeight;
		public int GopSize;
		public AVPixelFormat PixFmt;
		public int MeMethod;
		public IntPtr DrawHorizBand; // 待处理方法
		public IntPtr GetFormat; // 待处理方法
		public int MaxBFrames;
		public float BQuantFactor;
		public int RcStrategy;
		public int BFrameStrategy;
		public float BQuantOffset;
		public int HasBFrames;
		public int MpegQuant;
		public float IQuantFactor;
		public float IQuantOffset;
		public float LumiMasking;
		public float TemporalCplxMasking;
		public float SpatialCplxMasking;
		public float PMasking;
		public float DarkMasking;
		public int SliceCount;
		public int PredictionMethod;
		public int* SliceOffset;
		public AVRational SampleAspectRatio;
		public int MeCmp;
		public int MeSubCmp;
		public int MbCmp;
		public int IldctCmp;
		public int DiaSize;
		public int LastPredictorCount;
		public int PreMe;
		public int MePreCmp;
		public int PreDiaSize;
		public int MeSubpelQuality;
		public int DtgActiveFormat;
		public int MeRange;
		public int IntraQuantBias;
		public int InterQuantBias;
		public int SliceFlags;
		public int XvmcAcceleration;
		public int MbDecision;
		public ushort* IntraMatrix;
		public ushort* InterMatrix;
		public int ScenechangeThreshold;
		public int NoiseReduction;
		public int MeThreshold;
		public int MbThreshold;
		public int IntraDcPrecision;
		public int SkipTop;
		public int SkipBottom;
		public float BorderMasking;
		public int MbLmin;
		public int MbLmax;
		public int MePenaltyCompensation;
		public int BidirRefine;
		public int BrdScale;
		public int KeyintMin;
		public int Refs;
		public int Chromaoffset;
		public int ScenechangeFactor;
		public int Mv0Threshold;
		public int BSensitivity;
		public AVColorPrimaries ColorPrimaries;
		public AVColorTransferCharacteristic ColorTrc;
		public AVColorSpace Colorspace;
		public AVColorRange ColorRange;
		public AVChromaLocation ChromaSampleLocation;
		public int Slices;
		public AVFieldOrder FieldOrder;
		public int SampleRate;
		public int Channels;
		public AVSampleFormat SampleFmt;
		public int FrameSize;
		public int FrameNumber;
		public int BlockAlign;
		public int Cutoff;
		public AVChannelLayout ChannelLayout;
		public AVChannelLayout RequestChannelLayout;
		public AVAudioServiceType AudioServiceType;
		public AVSampleFormat RequestSampleFmt;
		public IntPtr GetBuffer2; // 待处理方法
		public int RefcountedFrames;
		public float Qcompress;
		public float Qblur;
		public int Qmin;
		public int Qmax;
		public int MaxQdiff;
		public float RcQsquish;
		public float RcQmodAmp;
		public int RcQmodFreq;
		public int RcBufferSize;
		public int RcOverrideCount;
		public RcOverride* RcOverride;
		public byte* RcEq;
		public long RcMaxRate;
		public long RcMinRate;
		public float RcBufferAggressivity;
		public float RcInitialCplx;
		public float RcMaxAvailableVbvUse;
		public float RcMinVbvOverflowUse;
		public int RcInitialBufferOccupancy;
		public int CoderType;
		public int ContextModel;
		public int Lmin;
		public int Lmax;
		public int FrameSkipThreshold;
		public int FrameSkipFactor;
		public int FrameSkipExp;
		public int FrameSkipCmp;
		public int Trellis;
		public int MinPredictionOrder;
		public int MaxPredictionOrder;
		public long TimecodeFrameStart;
		public IntPtr RtpCallback; // 待处理方法
		public int RtpPayloadSize;
		public int MvBits;
		public int HeaderBits;
		public int ITexBits;
		public int PTexBits;
		public int ICount;
		public int PCount;
		public int SkipCount;
		public int MiscBits;
		public int FrameBits;
		public byte* StatsOut;
		public byte* StatsIn;
		public int WorkaroundBugs;
		public int StrictStdCompliance;
		public int ErrorConcealment;
		public int Debug;
		public int DebugMv;
		public int ErrRecognition;
		public long ReorderedOpaque;
		public AVHWAccel* Hwaccel;
		public void* HwaccelContext;
		public fixed ulong Error[8];
		public int DctAlgo;
		public int IdctAlgo;
		public int BitsPerCodedSample;
		public int BitsPerRawSample;
		public int Lowres;
		public AVFrame* CodedFrame;
		public int ThreadCount;
		public int ThreadType;
		public int ActiveThreadType;
		public int ThreadSafeCallbacks;
		public IntPtr Execute; // 待处理方法
		public IntPtr Execute2; // 待处理方法
		public int NsseWeight;
		public int Profile;
		public int Level;
		public AVDiscard SkipLoopFilter;
		public AVDiscard SkipIdct;
		public AVDiscard SkipFrame;
		public byte* SubtitleHeader;
		public int SubtitleHeaderSize;
		public int ErrorRate;
		public ulong VbvDelay;
		public int SideDataOnlyPackets;
		public int InitialPadding;
		public AVRational Framerate;
		public AVPixelFormat SwPixFmt;
		public AVRational PktTimebase;
		public AVCodecDescriptor* CodecDescriptor;
		public long PtsCorrectionNumFaultyPts;
		public long PtsCorrectionNumFaultyDts;
		public long PtsCorrectionLastPts;
		public long PtsCorrectionLastDts;
		public byte* SubCharenc;
		public int SubCharencMode;
		public int SkipAlpha;
		public int SeekPreroll;
		public ushort* ChromaIntraMatrix;
		public byte* DumpSeparator;
		public byte* CodecWhitelist;
		public uint Properties;
		public AVPacketSideData* CodedSideData;
		public int NbCodedSideData;
		public AVBufferRef* HwFramesCtx;
		public int SubTextFormat;
		public int TrailingPadding;
	}
}